<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>设备作业统计</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/analysis_historyfeesummary.css" />
    <link rel="stylesheet" type="text/css" href="css/customerservicelist.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.picker.min.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.reset.css" />
    <link rel="stylesheet" type="text/css" href="css/analysis_equipment_frm.css" />
    <style>
        .app_list_txt_flex {
            display: flex;
            align-items: center;
        }
        .search-tag-label {
            display: inline-block;
            background: #ddd;
            color: #666;
            border-radius: 20px;
            padding: 3px 15px;
            border: solid 1px #eee;
            font-size: 0.6rem;
            margin-right: 10px;
        }
        .search-tag-label-active {
            background: #289fff;
            color: #fff;
            border: solid 1px #289fff;
        }
        .pf-datagrid{
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <!-- 弹框黑色背景 -->
        <div v-on:click="doHideSearch()" v-if="showsearch" class="maskbg">
        </div>
        <!-- //项目筛选 -->
        <div v-if="showsearchparam" class="searchparam" style="height: 70%;">
            <div class="searchcontent" style="height: 100%;">
                <div class="searchparamtitle">
                    所属项目
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSelectProject(item.ID,item.Name)"
                        v-bind:class="{'active':form.ProjectIDs.indexOf(item.ID)>-1}"
                        v-for="item in projectList">{{item.Name}}</label>
                </div>
                <div class="searchparamtitle">
                    作业类型
                </div>
                <div class="searchparamitem">
                    <label class="aui-margin-b-0" v-on:click="doSelectPlayType(item.ID)"
                        v-bind:class="{'active':form.playtypeListIDS.indexOf(item.ID)>-1}"
                        v-for="item in playtypeList">{{item.Name}}</label>
                </div>
                <div class="searchparamtitle">
                    超时状态
                </div>
                <div class="searchparamitem">
                    <label class="aui-margin-b-0" v-on:click="doSelectOverTime(item.ID)"
                        v-bind:class="{'active':form.overtimeListIDS.indexOf(item.ID)>-1}"
                        v-for="item in overtimeList">{{item.Name}}</label>
                </div>
                <!-- <div class="searchparamtitle">
                    负责人
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSelectHead(item.ID)"
                        v-bind:class="{'active':form.headListIDS.indexOf(item.ID)>-1}"
                        v-for="item in headList">{{item.Name}}</label>
                </div> -->
                <div class="searchparamtitle">
                    任务状态
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSelectstatus(item.ID)"
                        v-bind:class="{'active':form.statusListIDS.indexOf(item.ID)>-1}"
                        v-for="item in statusList">{{item.Name}}</label>
                </div>
                <div class="aui_bottom searchbottom">
                    <div v-on:click="doReset(1)" class="aui_bottombtn left">重置</div>
                    <div v-on:click="doSearch()" class="aui_bottombtn right">确认</div>
                </div>
            </div>
        </div>
        <!-- 时间筛选 -->
        <div v-if="showsearchmonth" class="searchparam">
            <div class="searchparamtitle">
                查询日期
            </div>
            <div class="searchparamitem">
                <label v-bind:class="{'active':form.activeDate==1}" v-on:click="doClickDay(1)">近三天</label>
                <label v-bind:class="{'active':form.activeDate==2}" v-on:click="doClickDay(2)">近七天</label>
                <label v-bind:class="{'active':form.activeDate==3}" v-on:click="doClickDay(3)">近三十天</label>
            </div>
            <div class="searchparamtitle">
                自定义查询日期
            </div>

            <div class="searchparamitem searchparamitem_input">
                <i class="icon iconfont icon-rili"></i>
                <span class="choose new-span-date" id="startdate" data-options='{"type":"date"}'
                    v-bind:class="{'textColorPlaceholder':form.startTime==''}">{{form.startTime==''?'开始日期':form.startTime}}</span>
                <span style="padding: 0 10px;">
                    至
                </span>
                <span class="choose new-span-date" id="enddate" data-options='{"type":"date"}'
                    v-bind:class="{'textColorPlaceholder':form.endTime==''}">{{form.endTime==''?'结束日期':form.endTime}}</span>
            </div>
            <div class="aui_bottom">
                <div v-on:click="doReset(2)" class="aui_bottombtn left">重置</div>
                <div v-on:click="doSearch()" class="aui_bottombtn right">确认</div>
            </div>
        </div>
        <div class="search_box fixedbox bgshadow" v-bind:class="{'fixedbox':showsearch}"
            style="margin-top:0px ; background: #fff;">
            <div class="searchitem" v-bind:class="{'chkedbox':showsearchparam}" v-on:click="doSelectSearchParam(1)">
                筛选
                <i v-if="!showsearchparam" class="icon iconfont icon-down"></i>
                <i v-if="showsearchparam" class="icon iconfont icon-shangjiantou" style="color:#fff;"></i>
            </div>
            <div class="searchitem" v-bind:class="{'chkedbox':showsearchmonth}" v-on:click="doSelectSearchParam(2)">
                {{form.activeDateDesc}}
                <i v-if="!showsearchmonth" class="icon iconfont icon-down"></i>
                <i v-if="showsearchmonth" class="icon iconfont icon-shangjiantou" style="color:#fff;"></i>
            </div>
        </div>
        <!-- 汇总分析内容 -->
        <div class="aui-content" style="margin-top: 2.3rem;">
            <div class="newcontentbox bababa">
                <label> {{ProjectName}} </label>
                <label class="aui-padded-l-5 aui-padded-r-5">|</label>
                <label>{{form.startTime}} 至 {{form.endTime}} 统计</span>
            </div>
            <div class="newcontentbox">
                <label v-on:click="doSelectTaskType(1)" class="search-tag-label"
                    v-bind:class="{'search-tag-label-active':form.TaskType==1}">计划任务</label>
                <label v-on:click="doSelectTaskType(2)" class="search-tag-label"
                    v-bind:class="{'search-tag-label-active':form.TaskType==2}">临时记录</label>
                <div v-on:click="open_task_detail()" class="newcontentbox-right bababa aui-font-size-12">详情<i
                        class="icon iconfont icon-xiangyoujiantou bababa aui-margin-l-5 aui-font-size-12"></i></div>
            </div>

            <!-- 计划任务-->
            <div v-if="form.TaskType==1" class="boxarea mainbox">
                <div class="app_list_txt">
                    <label class="xjIcon"><i class="icon iconfont icon-xunhu"></i></label>
                    <span class="bl0">巡检任务</span>
                </div>
                <!-- <div v-if="CheckChart.Count==undefined||CheckChart.Count<=0" class="noinfo" style="padding-top: 40px;padding-bottom: 40px;">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无数据</h5>
                </div> -->
                <div  style="width: 100%;">
                    <div id="xjcontainer" style="min-width:250px;height:250px"></div>
                </div>

                <div class="app_list_txt">
                    <label class="xjIcon xjIcon-org"><i class="icon iconfont icon-weibiaoti7"></i></label>
                    <span class="bl0">维保任务</span>
                </div>
                <!-- <div v-if="RepairChart.Count==undefined||RepairChart.Count<=0" class="noinfo" style="padding-top: 40px;padding-bottom: 40px;">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无数据</h5>
                </div> -->
                <div style="width: 100%;">
                    <div id="wbcontainer" style="min-width:250px;height:250px"></div>
                </div>
            </div>

            <div v-if="form.TaskType==1" class="boxarea mainbox aui-padded-b-15">
                <div class="app_list_txt" style="display: flex;">
                    <span>员工工作进度</span>
                </div>
                <div v-if="userList.length>0" class="user-header aui-padded-5">
                    <div class="user-content " v-for="(item,index) in userList">
                        <div class="box_wrapper aui-padded-t-10 aui-padded-b-10" style="width:52px;">
                            <img v-if="item.HeadImg" class="box_image" :src="item.HeadImg"
                                style="height: 52px;">
                            <img v-if="!item.HeadImg" class="box_image" src="../image/default.png"
                                style="height: 52px;">
                        </div>
                        <div class="app_list_txt_flex">
                            <div class="sta-list">
                                <div class="sta-title app_list_txt_flex aui-margin-b-5"
                                    style="justify-content: space-between;">
                                    <div>{{item.UserName}}</div>
                                    <div v-if="item.OutTimeCount" class="text-red aui-font-size-12">超时：{{item.OutTimeCount}}</div>
                                </div>
                                <div class="sta-title bababa aui-font-size-12">
                                    任务总数：{{item.Count}}&nbsp;/&nbsp;未开始：{{item.NoCompleteCount}}&nbsp;/&nbsp;执行中：{{item.ProgressCount}}&nbsp;/&nbsp;已完成：{{item.CompleteCount}}
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div v-if="userList.length<=0" class="noinfo" id="noorder"
                    style="padding-top: 40px;padding-bottom: 40px;">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无数据</h5>
                </div>
            </div>

            <div v-if="form.TaskType==1"  class="boxarea mainbox" style="padding: 20px 16px 10px 20px;">
                <div class="app_list_txt app_list_txt_flex">
                    <span>设备作业结果</span>
                    <div v-on:click="open_task_result()" class="newcontentbox-right bababa aui-font-size-12">详情<i
                            class="icon iconfont icon-xiangyoujiantou bababa aui-margin-l-5 aui-font-size-12"
                            style="vertical-align: top;"></i></div>
                </div>
                <div class="aui-row list-content aui-margin-t-15 pf-datagrid">
                    <div class="">
                        <div class="text-grey aui-margin-b-5">作业总数</div>
                        <div class="text-fontweight aui-margin-t-10">{{summary.Count}}</div>
                    </div>
                    <div class="" >
                        <div class="text-grey aui-margin-b-5">正常</div>
                        <div class="text-fontweight aui-margin-t-10">{{summary.ValidCount}}</div>
                    </div>
                    <div class="" >
                        <div class="text-grey aui-margin-b-5">异常</div>
                        <div class="text-red text-fontweight aui-margin-t-10">{{summary.NoValidCount}}</div>
                    </div>
                </div>
            </div>

            <!-- 临时记录-->
            <div v-if="form.TaskType==2" class="boxarea mainbox" style="padding: 20px 16px 10px 20px;">
                <div class="app_list_txt app_list_txt_flex">
                    <span>临时作业统计</span>
                </div>
                <div class="aui-row list-content aui-margin-t-15 pf-datagrid">
                    <div class="">
                        <div class="text-grey aui-margin-b-5">作业总数</div>
                        <div class="text-fontweight aui-margin-t-10">{{tempsummary.Count}}</div>
                    </div>
                    <div class="" >
                        <div class="text-grey aui-margin-b-5">巡检次数</div>
                        <div class="text-fontweight aui-margin-t-10">{{tempsummary.CheckCount}}</div>
                    </div>
                    <div class="" >
                        <div class="text-grey aui-margin-b-5">维保次数</div>
                        <div class="text-fontweight aui-margin-t-10">{{tempsummary.RepairCount}}</div>
                    </div>
                </div>
            </div>

            <div v-if="form.TaskType==2" class="boxarea mainbox aui-padded-b-15">
                <div class="app_list_txt" style="display: flex;">
                    <span>员工工作进度</span>
                </div>
                <div v-if="userList.length>0" class="user-header aui-padded-5">
                    <div class="user-content " v-for="(item,index) in userList">
                        <div class="box_wrapper aui-padded-t-10 aui-padded-b-10" style="width:52px;">
                            <img v-if="item.HeadImg" class="box_image" :src="item.HeadImg"
                                style="height: 52px;">
                            <img v-if="!item.HeadImg" class="box_image" src="../image/default.png"
                                style="height: 52px;">
                        </div>
                        <div class="app_list_txt_flex">
                            <div class="sta-list">
                                <div class="sta-title app_list_txt_flex aui-margin-b-5"
                                    style="justify-content: space-between;">
                                    <div>{{item.UserName}}</div>
                                </div>
                                <div class="sta-title bababa aui-font-size-12">
                                    作业总数：{{item.Count}}&nbsp;/&nbsp;正常：{{item.NormalCount}}&nbsp;/&nbsp;异常：{{item.NoNormalCount}}
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div v-if="userList.length<=0" class="noinfo" id="noorder"
                    style="padding-top: 40px;padding-bottom: 40px;">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无数据</h5>
                </div>
            </div>     
            <div v-if="form.TaskType==2" class="boxarea mainbox" style="padding: 20px 16px 10px 20px;">
                <div class="app_list_txt app_list_txt_flex">
                    <span>设备作业结果</span>
                    <div v-on:click="open_task_result()" class="newcontentbox-right bababa aui-font-size-12">详情<i
                            class="icon iconfont icon-xiangyoujiantou bababa aui-margin-l-5 aui-font-size-12"
                            style="vertical-align: top;"></i></div>
                </div>
                <div class="aui-row list-content aui-margin-t-15 pf-datagrid">
                    <div class="">
                        <div class="text-grey aui-margin-b-5">作业总数</div>
                        <div class="text-fontweight aui-margin-t-10">{{lssummary.Count}}</div>
                    </div>
                    <div class="" >
                        <div class="text-grey aui-margin-b-5">正常</div>
                        <div class="text-fontweight aui-margin-t-10">{{lssummary.NormalCount}}</div>
                    </div>
                    <div class="" >
                        <div class="text-grey aui-margin-b-5">异常</div>
                        <div class="text-red text-fontweight aui-margin-t-10">{{lssummary.NoNormalCount}}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/mui/mui.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.picker.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.poppicker.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/page/dateRangeUtil.js"></script>
<script type="text/javascript" src="../script/highcharts/highcharts.js"></script>
<script type="text/javascript" src="../script/highcharts/modules/exporting.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript" src="js/analysis_equipments_frm.js"></script>

</html>